package somar;

import java.util.HashMap;
import java.util.Map;

public class RSELRepository {
	
	private static Map<String, Object> rep = new HashMap<String, Object>();
	
	public static boolean putServiceObject(String serviceName, Object serviceObject) {
		if(rep.get(serviceName) != null) {
			return false;
		} else {
			rep.put(serviceName, serviceObject);
			System.out.println("[SOMAR Server] " + serviceName + " has putted in repository.");
			return true;
		}
	}
	
	public static Object getServiceObject(String serviceName) {
		return rep.get(serviceName);
	}
}